import http from "@/utils/http.js";

//获取广告图
export const bannerList = (data) => {
  return http.get("/applet/banner/list", data);
}

/**
 * 
 * @param {*} data 
 * @returns 
 * 获取通知列表
 */
export const notificationFormList = (data) => {
  return http.get("/applet/notificationForm/list", data);
}

/**
 * 
 * @param {*} data 
 * @returns 
 * 新增申请加盟
 */
export const applyAdd = (data) => {
  return http.post("/applet/apply/add", data);
}


//获取门店列表
export const getStoreList = (data) => {
    return http.get("/applet/store/list", data);
}
  
//根据id获取门店详细信息
export const getStoreQueryById = (data) => {
    return http.get("/applet/store/queryById", data);
}

//根据门店id获取插座列表
export const getSocketListByStoreId = (data) => {
    return http.get("/applet/device/getSocketListByStoreId", data);
}

//根据id获取设备详细信息
export const getDeviceInfoById = (data) => {
    return http.get("/applet/device/getDeviceInfoById", data);
}


//插座详情
export const getEquipmentsByCodeAndPort = (data) => {
    return http.get("/applet/device/getEquipmentsByCodeAndPort", data);
}

//获取市里所有门店列表
export const storeAllList = (data) => {
    return http.get("/applet/store/allList", data);
}


//上传请求
export const upload = (data) => {
    return http.post({
        url: "/applet/common/upload",
        data: data.buffer,
        header: { "Content-Type": data.contentType },
     });
}


//获取市里所有门店列表
export const settingGetInfo = (data) => {
    return http.get("/applet/setting/getInfo", data);
}

//根据设备编号获取门店信息和设备id
export const getStoreInfoByDeviceCode = (data) => {
    return http.get("/applet/device/getStoreInfoByDeviceCode", data);
}






